package trungnt.wipeoff.model;

import trungnt.wipeoff.Cs;
import trungnt.wipeoff.PlayState;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Actor;

public class GameOverActor extends Actor {

	private PlayState _playState = null;

	private Texture texture = null;
	private Sprite sprite = null;

	public GameOverActor(PlayState playState) {
		this._playState = playState;

		this.texture = this._playState.getGame().getAssetManager().get("images/gameoverbg.png");
		this.sprite = new Sprite(this.texture);

		this.setBounds(0, 0, Cs.VW, Cs.VH);
	}

	@Override
	public void draw(SpriteBatch batch, float parentAlpha) {
		final Color c = getColor();
		batch.setColor(c.r, c.g, c.b, c.a * parentAlpha);
		batch.draw(this.sprite, (Cs.VW - 504) / 2, ((Cs.VH - 246) / 2) - 100, getOriginX(), getOriginY(), 504, 246, getScaleX(), getScaleY(),
				getRotation());
	}

	public void dispose() {
	}
}
